<?php
include("configs/config.php");
try {
    runModule(getCurrentModule());
} catch (Exception $e){
    throw $e;
}
includeModule('blocks');
$contentMapper = new blockContent_Mapper();
$footer = "";
$footer = $contentMapper->findByName('footer');
if(is_object($footer)){
    $footer = str_replace(
        array('{CONTACT_ADRESA}', '{CONTACT_EMAIL1}', '{CONTACT_EMAIL2}','{CONTACT_TELEFON}'),
        array($CONTACT['CONTACT_ADRESA'], $CONTACT['CONTACT_EMAIL1'], $CONTACT['CONTACT_EMAIL2'],$CONTACT['CONTACT_TELEFON']),
        $footer->getBody()
       );
}

$rightColumn = "";
$rightColumn =  $contentMapper->findByName('coloana_dreapta');
if(is_object($rightColumn)){
$rightColumn = str_replace(
        array('{CONTACT_ADRESA}', '{CONTACT_EMAIL1}', '{CONTACT_EMAIL2}','{CONTACT_TELEFON}'),
        array($CONTACT['CONTACT_ADRESA'], $CONTACT['CONTACT_EMAIL1'], $CONTACT['CONTACT_EMAIL2'],$CONTACT['CONTACT_TELEFON']),
        $rightColumn->getBody()
       );
}
$tpl->assign("footer", $footer);
$tpl->assign("rightColumn", $rightColumn);
$tpl->parse("main");
$tpl->out("main");	


?>
